package com.biwano.swapmyjob.objects;

import javax.persistence.Entity;

import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.apache.openjpa.persistence.jdbc.Index; 

@Entity
public class JobExchange {

	public enum EXPERIENCE{
		junior,senior,expert;
	}
	
	
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="user")
	private User user;
	
	@Index
	private Float c_latitude;
	
	@Index
	private Float c_longitude;
	
	@Index 
	private EXPERIENCE c_experience;

	@Index 
	private String c_comments;

	@Index
	private int c_jobType;
	
	@Index
	private Float w_latitude;
	
	@Index
	private Float w_longitude;

	@Index
	private int w_jobType;

	private Float w_tolerance;
	
	@Id @GeneratedValue( strategy = GenerationType.IDENTITY )
	public int id;
	
	public JobExchange()
	{
		
	}



	public User getUser() {
		return user;
	}



	public void setUser(User user) {
		this.user = user;
	}

	public Float getC_latitude() {
		return c_latitude;
	}

	public void setC_latitude(Float c_latitude) {
		this.c_latitude = c_latitude;
	}



	public Float getC_longitude() {
		return c_longitude;
	}



	public void setC_longitude(Float c_longitude) {
		this.c_longitude = c_longitude;
	}



	public Float getW_latitude() {
		return w_latitude;
	}



	public void setW_latitude(Float r_latitude) {
		this.w_latitude = r_latitude;
	}



	public Float getW_longitude() {
		return w_longitude;
	}



	public void setW_longitude(Float r_longitude) {
		this.w_longitude = r_longitude;
	}



	public Float getW_tolerance() {
		return w_tolerance;
	}



	public void setW_tolerance(Float r_tolerance) {
		this.w_tolerance = r_tolerance;
	}





	public int getC_jobType() {
		return c_jobType;
	}



	public void setC_jobType(int c_jobType) {
		this.c_jobType = c_jobType;
	}



	public int getW_jobType() {
		return w_jobType;
	}



	public void setW_jobType(int w_jobType) {
		this.w_jobType = w_jobType;
	}



	public EXPERIENCE getC_experience() {
		return c_experience;
	}



	public void setC_experience(EXPERIENCE c_experience) {
		this.c_experience = c_experience;
	}



	public String getC_comments() {
		return c_comments;
	}



	public void setC_comments(String c_comments) {
		this.c_comments = c_comments;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	

	
}
